{% extends "base.html" %}

{% block title %}Bill{% endblock %}

{% block content %}
  <p>
  Bill: <br />
  {{ bill.text }}
  <a href="/bills/{{ bill.id }}/edit/">Edit</a>
  </p>

  <p>
  Annotations:
  {% if annotation_list %}
    <ul>
      {% for annotation in annotation_list %}
        {% if annotation.text|length > 10  %}
          <li><a href="/annotations/{{ annotation.id }}/">
            {{ annotation.text|slice:":10" }}
          </a></li>
        {% else %}
          <li><a href="/annotations/{{ annotation.id }}/">{{ annotation.text }}
          </a></li>
        {% endif %}
      {% endfor %}
    </ul>
  {% else %}
    <p>you haven't added any annotations yet!</p>
  {% endif %}
  </p>

  <form action="/addannotation/" method="post" class="form"
    id="formaddannotation">
    {% csrf_token %}
    <input type="hidden" name="add_for" value="{{ bill.id }}" />
    <input type="submit" value="Add Annotation" />
  </form>
{% endblock %}

